package Demo1;

public class Text {

    public static void main(String[] args)throws CloneNotSupportedException{
        Student student1 = new Student("zhangsan",10,80.0);
        Student student2 = new Student("wangwu",20,90.0);
        Student student3 = (Student) student1.clone();
        System.out.println(student1.teacher);
        System.out.println(student3.teacher);

        System.out.println("--------------------------");

        student1.teacher.name = "Mrmu";

        System.out.println(student1.teacher);
        System.out.println(student3.teacher);
    }

}
